export function countDuplicates(arr:any,str:any) {
  let obj = {};
  for (let i = 0; i < arr.length; i++) {
    if ((obj as any)[arr[i][str]]) {
      (obj as any)[arr[i][str]]++;
    } else {
      (obj as any)[arr[i][str]] = 1;
    }
  }
  let result = [];
  for (let key in obj) {
    result.push({ value: key, count: (obj as any)[key] });
  }
  return result;
}

// 示例


